package com.netease.service;

import com.netease.common.NetServiceCommon;
import com.netease.domain.CloudDiskItem;
import com.netease.domain.IPItem;
import com.sun.tools.javac.util.Pair;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.io.IOException;
import java.util.List;

/**
 * Created by dongle on 2017/2/24.
 */
@Service
public class IPService {
    private static String listUrl = "https://open.c.163.com/api/v1/ips";
    @Autowired
    private NetServiceCommon netServiceCommon;

    public List<IPItem> getList() throws IOException {
        List<IPItem> listAll = netServiceCommon.getListAll(listUrl, IPItem.class, "ips", "offset", "limit");
        return listAll;
    }

}
